package com.zzyl.controller.customer;

import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.dto.UserLoginRequestDto;
import com.zzyl.service.CostomerLongService;
import com.zzyl.service.WechatService;

import com.zzyl.service.impl.WechatServiceimpl;
import com.zzyl.vo.LoginVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户端用户登录
 */
@RestController
@RequestMapping("/customer/user")
@Api(tags = "用户端用户登录")
public class CostomerLongController extends BaseController {
    @Autowired
    private CostomerLongService costomerLongService;


    @PostMapping("/login")
    public ResponseResult<LoginVo> login(@RequestBody UserLoginRequestDto userLoginRequestDto) {
        LoginVo loginVo = costomerLongService.login(userLoginRequestDto);
        return success(loginVo) ;
    }
}
